<template>

	<view class="content">
			<view>
				<navigator url="/pages/index/bbs/addarticle"><button type="default" size="mini">发布文章</button></navigator>
			</view>
		<view class="page-section" indexListBox>
			<view class="indexList" v-for="(item,index) in tableData" :key="index">
				<!-- <view class="info"> -->
					<view>作者:{{item.fileAuthor}} &nbsp;</view>
					<view>标题:{{item.fileTitle}} &nbsp;</view>
					<view>内容:{{item.fileContents}} &nbsp;</view>
				    <view>点赞:{{item.bbsLive}} &nbsp;</view>
					<view>
						<image :src="item.fileFile" style="width: 500rpx;height: 300rpx;"></image>
					</view>
			
			
			
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tableData: [],
				userId : 3
			}
		},onLoad(){
			this.tasklist()
		},
		methods:{
			tasklist(){
				uni.request({
				    url: 'http://localhost:7000/bbs/bbs/findBbsArticleuid/'+this.userId, //仅为示例，并非真实接口地址。
				    method: 'POST',
				    success: (res) => {
						console.log(res.data.data)
				        this.tableData=res.data.data
						//console.log(this.Data)
				    }
				});
			}
		},
		goto(url) {
							uni.navigateTo({
								url:"/pages/index/bbs/addarticle"
							})
						}
	}
</script>

<style>
	 .indexList uni-image {
	            width: 100%;
	            height: 130px;
	            background: #eaeaea;
	        }
	        .indexList {
	            margin-top: 15px;
	            margin-bottom: 15px;
	        }
	        .indexList .title {
	            background: #000;
	            color: #fff;
	            font-size: 16px;
	            line-height: 37px;
	            padding: 0 10px;
	            margin-top: -5px;
	    }
	       .indexListBox{
	           margin-top: 20px;
	       }
</style>
